package com.liam.apppush.config;

import com.gexin.rp.sdk.http.IGtPush;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class GeTuiConfig {

    @Value("${getui.push.appKey}")
    protected String appKey ;
    @Value("${getui.push.appId}")
    protected String appId;
    @Value("${getui.push.appSecret}")
    protected String appSecret;
    @Value("${getui.push.masterSecret}")
    protected String masterSecret;
    @Value("${getui.push.host}")
    protected String host;

    private IGtPush push = null;
    public IGtPush getPush(){
        if(push == null){
            synchronized (this){
                if(push == null){
                    push = new IGtPush(host,appKey,masterSecret);
                }
            }
        }
        return push;
    }




    @Value("${apple.push.certificatePath}")
    protected String certificatePath;
    @Value("${apple.push.certificatePassword}")
    protected String certificatePassword;

}
